/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for MM_Letter_Of_Attorney
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_MM_Letter_Of_Attorney extends PO implements I_MM_Letter_Of_Attorney, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130819L;

    /** the default Constructor */
    public X_MM_Letter_Of_Attorney(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_MM_Letter_Of_Attorney (Properties ctx, int MM_Letter_Of_Attorney_ID, String trxName)
    {
      super (ctx, MM_Letter_Of_Attorney_ID, trxName);
      /** if (MM_Letter_Of_Attorney_ID == 0)
        {
			setMM_Letter_Of_Attorney_ID (0);
        } */
    }

    /** Load Constructor */
    public X_MM_Letter_Of_Attorney (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 7 - System - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_MM_Letter_Of_Attorney[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException
    {
		return (org.compiere.model.I_C_BankAccount)MTable.get(getCtx(), org.compiere.model.I_C_BankAccount.Table_Name)
			.getPO(getC_BankAccount_ID(), get_TrxName());	}

	/** Set Bank Account.
		@param C_BankAccount_ID 
		Account at the Bank
	  */
	public void setC_BankAccount_ID (int C_BankAccount_ID)
	{
		if (C_BankAccount_ID < 1) 
			set_Value (COLUMNNAME_C_BankAccount_ID, null);
		else 
			set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID));
	}

	/** Get Bank Account.
		@return Account at the Bank
	  */
	public int getC_BankAccount_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getC_BPartner_Chief() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_Chief_ID(), get_TrxName());	}

	/** Set C_BPartner_Chief.
		@param C_BPartner_Chief_ID 
		Business Partner Chief
	  */
	public void setC_BPartner_Chief_ID (int C_BPartner_Chief_ID)
	{
		if (C_BPartner_Chief_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_Chief_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_Chief_ID, Integer.valueOf(C_BPartner_Chief_ID));
	}

	/** Get C_BPartner_Chief.
		@return Business Partner Chief
	  */
	public int getC_BPartner_Chief_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Chief_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
    {
		return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
			.getPO(getC_Order_ID(), get_TrxName());	}

	/** Set Order.
		@param C_Order_ID 
		Order
	  */
	public void setC_Order_ID (int C_Order_ID)
	{
		if (C_Order_ID < 1) 
			set_Value (COLUMNNAME_C_Order_ID, null);
		else 
			set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
	}

	/** Get Order.
		@return Order
	  */
	public int getC_Order_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Consumer.
		@param Consumer Consumer	  */
	public void setConsumer (String Consumer)
	{
		throw new IllegalArgumentException ("Consumer is virtual column");	}

	/** Get Consumer.
		@return Consumer	  */
	public String getConsumer () 
	{
		return (String)get_Value(COLUMNNAME_Consumer);
	}

	/** Set Create lines from.
		@param CreateFrom 
		Process which will generate a new document lines based on an existing document
	  */
	public void setCreateFrom (String CreateFrom)
	{
		set_Value (COLUMNNAME_CreateFrom, CreateFrom);
	}

	/** Get Create lines from.
		@return Process which will generate a new document lines based on an existing document
	  */
	public String getCreateFrom () 
	{
		return (String)get_Value(COLUMNNAME_CreateFrom);
	}

	/** Set dateissue.
		@param dateissue dateissue	  */
	public void setdateissue (Timestamp dateissue)
	{
		set_Value (COLUMNNAME_dateissue, dateissue);
	}

	/** Get dateissue.
		@return dateissue	  */
	public Timestamp getdateissue () 
	{
		return (Timestamp)get_Value(COLUMNNAME_dateissue);
	}

	/** Set Description.
		@param Description 
		Optional short description of the record
	  */
	public void setDescription (String Description)
	{
		set_Value (COLUMNNAME_Description, Description);
	}

	/** Get Description.
		@return Optional short description of the record
	  */
	public String getDescription () 
	{
		return (String)get_Value(COLUMNNAME_Description);
	}

	/** Set Document No.
		@param DocumentNo 
		Document sequence number of the document
	  */
	public void setDocumentNo (String DocumentNo)
	{
		set_Value (COLUMNNAME_DocumentNo, DocumentNo);
	}

	/** Get Document No.
		@return Document sequence number of the document
	  */
	public String getDocumentNo () 
	{
		return (String)get_Value(COLUMNNAME_DocumentNo);
	}

	/** Set FI_BIN/IIN.
		@param FI_BIN_IIN 
		Business identification number/Individual identification number
	  */
	public void setFI_BIN_IIN (String FI_BIN_IIN)
	{
		throw new IllegalArgumentException ("FI_BIN_IIN is virtual column");	}

	/** Get FI_BIN/IIN.
		@return Business identification number/Individual identification number
	  */
	public String getFI_BIN_IIN () 
	{
		return (String)get_Value(COLUMNNAME_FI_BIN_IIN);
	}

	/** Set Comment/Help.
		@param Help 
		Comment or Hint
	  */
	public void setHelp (String Help)
	{
		set_Value (COLUMNNAME_Help, Help);
	}

	/** Get Comment/Help.
		@return Comment or Hint
	  */
	public String getHelp () 
	{
		return (String)get_Value(COLUMNNAME_Help);
	}

	/** Set ID_Card.
		@param ID_Card ID_Card	  */
	public void setID_Card (String ID_Card)
	{
		throw new IllegalArgumentException ("ID_Card is virtual column");	}

	/** Get ID_Card.
		@return ID_Card	  */
	public String getID_Card () 
	{
		return (String)get_Value(COLUMNNAME_ID_Card);
	}

	/** Set MM_Letter_Of_Attorney ID.
		@param MM_Letter_Of_Attorney_ID MM_Letter_Of_Attorney ID	  */
	public void setMM_Letter_Of_Attorney_ID (int MM_Letter_Of_Attorney_ID)
	{
		if (MM_Letter_Of_Attorney_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_ID, Integer.valueOf(MM_Letter_Of_Attorney_ID));
	}

	/** Get MM_Letter_Of_Attorney ID.
		@return MM_Letter_Of_Attorney ID	  */
	public int getMM_Letter_Of_Attorney_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Letter_Of_Attorney_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Name.
		@param Name 
		Alphanumeric identifier of the entity
	  */
	public void setName (String Name)
	{
		set_Value (COLUMNNAME_Name, Name);
	}

	/** Get Name.
		@return Alphanumeric identifier of the entity
	  */
	public String getName () 
	{
		return (String)get_Value(COLUMNNAME_Name);
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), getName());
    }

	/** Set Payer.
		@param Payer 
		Payer
	  */
	public void setPayer (String Payer)
	{
		throw new IllegalArgumentException ("Payer is virtual column");	}

	/** Get Payer.
		@return Payer
	  */
	public String getPayer () 
	{
		return (String)get_Value(COLUMNNAME_Payer);
	}

	/** Set Valid to.
		@param ValidTo 
		Valid to including this date (last day)
	  */
	public void setValidTo (Timestamp ValidTo)
	{
		set_Value (COLUMNNAME_ValidTo, ValidTo);
	}

	/** Get Valid to.
		@return Valid to including this date (last day)
	  */
	public Timestamp getValidTo () 
	{
		return (Timestamp)get_Value(COLUMNNAME_ValidTo);
	}

	public org.compiere.model.I_C_BPartner getVendor() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getVendor_ID(), get_TrxName());	}

	/** Set Vendor.
		@param Vendor_ID 
		The Vendor of the product/service
	  */
	public void setVendor_ID (int Vendor_ID)
	{
		if (Vendor_ID < 1) 
			set_Value (COLUMNNAME_Vendor_ID, null);
		else 
			set_Value (COLUMNNAME_Vendor_ID, Integer.valueOf(Vendor_ID));
	}

	/** Get Vendor.
		@return The Vendor of the product/service
	  */
	public int getVendor_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_Vendor_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}